chore(design): audit every locale, and measure CJK in CJK - #198
Merged
Conversation
bin/design-audit.mjs is the only thing that measures the rendered pages, so its blind spots are the design system's blind spots. It had two. Its page list was six English routes plus /zh-CN/, leaving five languages unmeasured. It now derives the list from LOCALES in build-pages.mjs -- six page shapes across all seven languages, plus the three untranslated pages -- so the eighth language will be audited the day it lands. English stays the default; --all expands to the full matrix. More importantly, the character probe was hard-coded Latin. Every language therefore reported 72 characters per line, which looked like perfect consistency but was really the container width restated in Latin units. The CJK pages run at 41 full-width characters and that number had never appeared in any report. The probe now follows <html lang>. Measured: Latin 70-72 (band 45-75, fine); CJK 40-41 (band 30-40, one over). Left as is -- 660 / 16px is 41.25, and pulling only the paragraphs in would break their alignment with the headings, rules and tables the whole design hangs on. Recorded in docs/design-system.md so the next person to touch the type scale knows it is already at the ceiling. Two contract tests pin the script's own coverage. Reverse-verified: stashing the design-audit change turns both red. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
chaxus
enabled auto-merge (rebase)
August 23, 2026 05:20
Deploying document with
|
| Latest commit: |
384568d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f4542d7e.document-7hm.pages.dev |
| Branch Preview URL: | https://audit-all-locales.document-7hm.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bin/design-audit.mjs is the only thing that measures the rendered pages, so
its blind spots are the design system's blind spots. It had two.
Its page list was six English routes plus /zh-CN/, leaving five languages
unmeasured. It now derives the list from LOCALES in build-pages.mjs -- six
page shapes across all seven languages, plus the three untranslated pages --
so the eighth language will be audited the day it lands. English stays the
default; --all expands to the full matrix.
More importantly, the character probe was hard-coded Latin. Every language
therefore reported 72 characters per line, which looked like perfect
consistency but was really the container width restated in Latin units. The
CJK pages run at 41 full-width characters and that number had never appeared
in any report. The probe now follows .
Measured: Latin 70-72 (band 45-75, fine); CJK 40-41 (band 30-40, one over).
Left as is -- 660 / 16px is 41.25, and pulling only the paragraphs in would
break their alignment with the headings, rules and tables the whole design
hangs on. Recorded in docs/design-system.md so the next person to touch the
type scale knows it is already at the ceiling.
Two contract tests pin the script's own coverage. Reverse-verified: stashing
the design-audit change turns both red.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com